package sk.project.accounting.data.model;

// Generated Dec 17, 2012 9:50:06 PM by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CommodityMovement generated by hbm2java
 */
@Entity
@Table(name = "commodity_movement", catalog = "skl_hosp_new")
public class CommodityMovement implements java.io.Serializable {

	private Integer id;
	private WarehouseReceipt warehouseReceipt;
	private IssueCard issueCard;
	private Date date;
	private Integer sum;
	private Date closed;
	private String description;
	private Date updated;
	private Date closingDate;
	private String status;
	private String income;

	public CommodityMovement() {
	}

	public CommodityMovement(Date updated, Date closingDate, String status,
			String income) {
		this.updated = updated;
		this.closingDate = closingDate;
		this.status = status;
		this.income = income;
	}

	public CommodityMovement(WarehouseReceipt warehouseReceipt,
			IssueCard issueCard, Date date, Integer sum, Date closed,
			String description, Date updated, Date closingDate, String status,
			String income) {
		this.warehouseReceipt = warehouseReceipt;
		this.issueCard = issueCard;
		this.date = date;
		this.sum = sum;
		this.closed = closed;
		this.description = description;
		this.updated = updated;
		this.closingDate = closingDate;
		this.status = status;
		this.income = income;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_warehouse_receipt")
	public WarehouseReceipt getWarehouseReceipt() {
		return this.warehouseReceipt;
	}

	public void setWarehouseReceipt(WarehouseReceipt warehouseReceipt) {
		this.warehouseReceipt = warehouseReceipt;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "id_issue_card")
	public IssueCard getIssueCard() {
		return this.issueCard;
	}

	public void setIssueCard(IssueCard issueCard) {
		this.issueCard = issueCard;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "date", length = 19)
	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column(name = "sum")
	public Integer getSum() {
		return this.sum;
	}

	public void setSum(Integer sum) {
		this.sum = sum;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "closed", length = 19)
	public Date getClosed() {
		return this.closed;
	}

	public void setClosed(Date closed) {
		this.closed = closed;
	}

	@Column(name = "description", length = 65535)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updated", nullable = false, length = 19)
	public Date getUpdated() {
		return this.updated;
	}

	public void setUpdated(Date updated) {
		this.updated = updated;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "closing_date", nullable = false, length = 19)
	public Date getClosingDate() {
		return this.closingDate;
	}

	public void setClosingDate(Date closingDate) {
		this.closingDate = closingDate;
	}

	@Column(name = "status", nullable = false, length = 6)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@Column(name = "income", nullable = false, length = 5)
	public String getIncome() {
		return this.income;
	}

	public void setIncome(String income) {
		this.income = income;
	}

}
